from langchain.agents import load_tools
from langchain.agents import initialize_agent
from langchain.agents import AgentType
from langchain_openai import ChatOpenAI

chat = ChatOpenAI(temperature = 0)

tools = load_tools(["serpapi", "llm-math"], llm=chat)

agent = initialize_agent(tools, chat, agent=AgentType.CHAT_ZERO_SHOT_REACT_DESCRIPTION, verbose=True)

agent.run("What will be the weather in Shanghai three days from now?")
